/*
 * @Description: 条目检索
 * @Author: Zzt
 * @Date: 2022-08-30 14:51:08
 * @LastEditTime: 2023-03-09 11:19:22
 */
import EntrySearchWarp from './components/EntrySearchWarp';
import { EntrySearchContextProvider } from './contexts/EntrySearchContext';
import { SearchTypeContext } from './contexts/SearchTypeContext';
import { SearchRouteTypes } from './dictionaries';
interface IMappingProps {
  routerType?: SearchRouteTypes;
}
export const EntryAndRelevance = (props: IMappingProps) => {
  const { routerType = SearchRouteTypes.Entry } = props;

  return (
    <>
      <SearchTypeContext.Provider value={{ routerType }}>
        <EntrySearchContextProvider>
          <EntrySearchWarp />
        </EntrySearchContextProvider>
      </SearchTypeContext.Provider>
    </>
  );
};

const EntrySearch = () => {
  return <EntryAndRelevance routerType={SearchRouteTypes.Entry} />;
};
export default EntrySearch;
